import type { IRepairList } from '@/types/repairs'
import type { IPage } from '@/types/table'
import { request } from '@/utils/request'

/**
 * 获取报修申请列表
 * @param data 
 * @returns 
 */
export const getRepairsList = (data:IPage) =>
    request<IRepairList>('/repairs/isPass','get',data)

/**
 * 通过报修申请
 * @param id 
 * @returns 
 */
export const isPassedForRepair = (id:number) => 
    request<string>('/repairs/passed/'+id,'patch')

/**
 * 未通过报修申请
 * @param id 
 * @returns 
 */
export const isNotPassedForRepair = (id:number) => 
    request<string>('/repairs/notPassed/'+id,'patch')